package org.groovymud.shell.io;

import net.wimpi.telnetd.net.Connection;

import org.groovymud.shell.io.filters.TerminalFilterChain;
import org.groovymud.shell.telnetd.ExtendedTerminalIO;

public class TerminalIOFactory {

    private TerminalFilterChain<TerminalIO> filterChain;

    public TerminalIO createTerminalIO(Connection con) {
        ExtendedTerminalIO io = new ExtendedTerminalIO(con, getFilterChain());
        return io;
    }

    public void setFilterChain(TerminalFilterChain<TerminalIO> filterChain) {
        this.filterChain = filterChain;
    }

    public TerminalFilterChain<TerminalIO> getFilterChain() {
        return filterChain;
    }
}
